home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / ContextualMenuManagerSDK 1.0.3 / Contextual Menu Development / Headers & Stubs / ContextualMenu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-27  |  2.0 KB  |  103 lines  |  [TEXT/MPS ]

  1. #ifndef __CONTEXTUALMENU__
  2. #define __CONTEXTUALMENU__
  3.  
  4. #ifndef __APPLEEVENTS__
  5. #include <AppleEvents.h>
  6. #endif
  7. #ifndef __EVENTS__
  8. #include <Events.h>
  9. #endif
  10. #ifndef __MENUS__
  11. #include <Menus.h>
  12. #endif
  13.  
  14.  
  15.  
  16. #if PRAGMA_ONCE
  17. #pragma once
  18. #endif
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. #if PRAGMA_IMPORT
  25. #pragma import on
  26. #endif
  27.  
  28. #if PRAGMA_STRUCT_ALIGN
  29.     #pragma options align=mac68k
  30. #elif PRAGMA_STRUCT_PACKPUSH
  31.     #pragma pack(push, 2)
  32. #elif PRAGMA_STRUCT_PACK
  33.     #pragma pack(2)
  34. #endif
  35.  
  36. /* Gestalt Selector for classic 68K apps only. */
  37. /* CFM apps should weak link and check the symbols. */
  38.  
  39. enum {
  40.     gestaltContextualMenuAttr    = FOUR_CHAR_CODE('cmnu'),
  41.     gestaltContextualMenuUnusedBit = 0,
  42.     gestaltContextualMenuTrapAvailable = 1
  43. };
  44.  
  45. /* Values indicating what kind of help the application supports */
  46.  
  47. enum {
  48.     kCMHelpItemNoHelp            = 0,
  49.     kCMHelpItemAppleGuide        = 1,
  50.     kCMHelpItemOtherHelp        = 2
  51. };
  52.  
  53. /* Values indicating what was chosen from the menu */
  54.  
  55. enum {
  56.     kCMNothingSelected            = 0,
  57.     kCMMenuItemSelected            = 1,
  58.     kCMShowHelpSelected            = 3
  59. };
  60.  
  61. EXTERN_API( OSStatus )
  62. InitContextualMenus                (void)                                                        TWOWORDINLINE(0x7001, 0xAA72);
  63.  
  64. EXTERN_API( Boolean )
  65. IsShowContextualMenuClick        (const EventRecord *    inEvent)                            TWOWORDINLINE(0x7002, 0xAA72);
  66.  
  67. EXTERN_API( OSStatus )
  68. ContextualMenuSelect            (MenuHandle             inMenu,
  69.                                  Point                     inGlobalLocation,
  70.                                  Boolean                 inReserved,
  71.                                  UInt32                 inHelpType,
  72.                                  ConstStr255Param         inHelpItemString,
  73.                                  const AEDesc *            inSelection,
  74.                                  UInt32 *                outUserSelectionType,
  75.                                  SInt16 *                outMenuID,
  76.                                  UInt16 *                outMenuItem)                        TWOWORDINLINE(0x7003, 0xAA72);
  77.  
  78. EXTERN_API( Boolean )
  79. ProcessIsContextualMenuClient    (ProcessSerialNumber *    inPSN)                                TWOWORDINLINE(0x7004, 0xAA72);
  80.  
  81.  
  82.  
  83. #if PRAGMA_STRUCT_ALIGN
  84.     #pragma options align=reset
  85. #elif PRAGMA_STRUCT_PACKPUSH
  86.     #pragma pack(pop)
  87. #elif PRAGMA_STRUCT_PACK
  88.     #pragma pack()
  89. #endif
  90.  
  91. #ifdef PRAGMA_IMPORT_OFF
  92. #pragma import off
  93. #elif PRAGMA_IMPORT
  94. #pragma import reset
  95. #endif
  96.  
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif /* __CONTEXTUALMENU__ */
  102.  
  103.